package com.kdayun;

import java.nio.charset.Charset;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

import com.kdayun.z1.core.framework.ApplicationContextHolder;

@ServletComponentScan
@ComponentScan(basePackages = { "com.kdayun.admin", "com.kdayun.boot", "com.kdayun.z1", "com.kdayun.manager",
		"com.kdayun.report", "com.kdayun.baidu", "com.kdayun.wecom", "com.kdayun.wechat" })
@SpringBootApplication
@MapperScan(basePackages = { "com.kdayun.*.mapper" })
public class MainApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication springApplication = new SpringApplication(MainApplication.class,
				ApplicationContextHolder.class);

		System.out.println("file.encoding:" + System.getProperty("file.encoding"));
		System.out.println("defaultCharset:" + Charset.defaultCharset());

		springApplication.run(args);

	}

}
